import axios from 'axios';

const apiClient = axios.create({
  baseURL: '/dev-api',
  timeout: 5000,
});

export default {
  getCategories() {
    return apiClient.get('/home/getCategoryInfo');
  },
  getBooks() {
    return apiClient.get('/home/getBookInfo');
  },
  submitBorrow(data) {
    return apiClient.post('/home/submitBorrowRecord', data);
  },
  returnBook(bookId, studentId) {
    return apiClient.post('/borrow/return', { bookId, studentId });
  }
};